package com.example.neusoft.a16110100126yttordering.model;
import com.example.neusoft.a16110100126yttordering.common.Constants;
import com.example.neusoft.a16110100126yttordering.listener.RetrofitListener;
import com.example.neusoft.a16110100126yttordering.service.UserService;
import retrofit2.Call;


public class UserModel extends RetrofitBaseModel {
    private UserService userService;

    public UserModel() {

        this.userService = retrofit.create(UserService.class);
    }
    public void userLogin(String username, String password, final RetrofitListener listener) {
        Call call = userService.userLogin(username, password);

        bindCallback(call,listener,Constants.USERLOGIN);
    }
    public void userRegister(String username, String userpass, String mobilenum, String address,
                             String comment, final RetrofitListener listener) {
        Call call = userService.userRegister(username, userpass, mobilenum, address, comment);
        bindCallback(call,listener,Constants.USEREGISTER);

    }
}
